Skip to content

Revert "fix: pass workspace policyID when exporting with account-level custom templates"#93091

Merged
Julesssss merged 1 commit into
mainfrom
revert-92131-fix/issue-89388
Jun 9, 2026
Merged

Revert "fix: pass workspace policyID when exporting with account-level custom templates"#93091
Julesssss merged 1 commit into
mainfrom
revert-92131-fix/issue-89388

Conversation

@madmax330

@madmax330 madmax330 commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Reverts #92131

That PR caused a deploy blocker: #93088

So we're doing a straight revert

@madmax330 madmax330 self-assigned this Jun 9, 2026
@madmax330 madmax330 requested review from a team as code owners June 9, 2026 15:53
@melvin-bot melvin-bot Bot requested review from trjExpensify and youssef-lr and removed request for a team June 9, 2026 15:53
@melvin-bot

melvin-bot Bot commented Jun 9, 2026

Copy link
Copy Markdown

@youssef-lr Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button]

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 90d887adae

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

reportIDList: [moneyRequestReport.reportID],
transactionIDList,
policyID: policyID ?? moneyRequestReport.policyID,
policyID,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Pass report policyID for account-level template exports

For account-level in-app templates, getExportTemplates creates entries without template.policyID, so this call now sends policyID: undefined whenever a user exports a workspace report with one of those templates. The backend no longer has the workspace context needed to resolve policy fields/GL codes, so account-level custom template exports from the report menu produce incorrect or missing workspace-specific columns; the selection-toolbar path still passes policy?.id for the same API call.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It;s a straight revert

reportIDList: [],
transactionIDList: [],
policyID: exportPolicyID,
policyID,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Restore workspace fallback for search template exports

When users choose an account-level custom template from search, template.policyID is undefined. For a single-workspace selection or an “all matching” search filtered to one policy, this branch now queues policyID: undefined instead of deriving the workspace from the selection/query, so workspace-specific fields in the exported template resolve incorrectly even though all exported items belong to one workspace.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a straight revert

@Julesssss

Copy link
Copy Markdown
Contributor

It's a straight revert

@Julesssss Julesssss merged commit 5f4c382 into main Jun 9, 2026
41 of 42 checks passed
@Julesssss Julesssss deleted the revert-92131-fix/issue-89388 branch June 9, 2026 19:43
@github-actions

github-actions Bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

🚧 @Julesssss has triggered a test Expensify/App build. You can view the workflow run here.

@OSBotify

OSBotify commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release.

OSBotify pushed a commit that referenced this pull request Jun 9, 2026
Revert "fix: pass workspace policyID when exporting with account-level custom templates"

(cherry picked from commit 5f4c382)

(cherry-picked to staging by Julesssss)
@OSBotify OSBotify added the CP Staging marks PRs that have been CP'd to staging label Jun 9, 2026
@OSBotify

OSBotify commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

🚀 Cherry-picked to staging by https://github.com/Julesssss in version: 9.4.1-6 🚀

platform result
🕸 web 🕸 success ✅
🤖 android 🤖 success ✅
🍎 iOS 🍎 success ✅

Bundle Size Analysis (Sentry):

@MelvinBot

Copy link
Copy Markdown
Contributor

Help site review — no changes required

I reviewed the changes in this PR and no updates to the help site files under App/docs/articles are required.

Why:

  • This PR is a straight revert of Expensify/App#92131, which addressed a deploy blocker (Expensify/App#93088).
  • The changes are confined to two internal hooks (src/hooks/useExportActions.ts and src/hooks/useSearchBulkActions.ts) and only affect which policyID is passed to the export backend for GL-code resolution when exporting with custom templates.
  • This is an internal logic/data-resolution detail. It does not add, remove, or rename any user-facing feature, tab, setting, button, or workflow that the help site documents.
  • The existing export-related articles (e.g. How-to-Export-Expenses.md, How-to-Export-Reports.md, Search-and-Download-Expenses.md) describe how users export expenses/reports at a workflow level — none of that user-facing behavior is changed by this revert.

No draft docs PR has been created since there is nothing to document.


@madmax330, I determined no help site changes are needed for this revert. If you believe a user-facing behavior change should be documented, let me know and I'll create the draft PR.

@OSBotify

Copy link
Copy Markdown
Contributor

🚀 Deployed to production by https://github.com/Julesssss in version: 9.4.1-6 🚀

platform result
🕸 web 🕸 success ✅
🤖 android 🤖 success ✅
🍎 iOS 🍎 success ✅

@OSBotify

Copy link
Copy Markdown
Contributor

🚀 Cherry-picked to staging by https://github.com/Julesssss in version: 9.4.2-0 🚀

platform result
🕸 web 🕸 success ✅
🤖 android 🤖 success ✅
🍎 iOS 🍎 success ✅

Bundle Size Analysis (Sentry):

@MelvinBot

Copy link
Copy Markdown
Contributor

🤖 Help site review: no changes required

I reviewed this PR and no updates to the help site (docs/articles) are needed.

Why: This is a straight revert of Expensify/App#92131, which was an internal logic fix for how a workspace policyID is forwarded to the backend QueueExportSearchWithTemplate command (so GL codes resolve correctly when exporting with account-level custom templates). The change only touches two hooks — src/hooks/useExportActions.ts and src/hooks/useSearchBulkActions.ts — and adjusts internal policyID plumbing. There is:

  • No new or changed user-facing feature, page, tab, or button
  • No change to documented workflows (creating/using custom export templates, GL codes, etc.)
  • No change to any UI copy, settings labels, or naming

The help articles describe how to create and use custom export templates and GL codes, not the internal mechanics of which policyID is passed to a backend export command. That documented behavior is unaffected by this revert, so no draft help site PR was created.

@madmax330, since no help site changes are required, no linked docs PR was created. Let me know if you'd like me to take another look.

@OSBotify

Copy link
Copy Markdown
Contributor

🚀 Cherry-picked to staging by https://github.com/Julesssss in version: 9.4.4-1 🚀

platform result
🕸 web 🕸 success ✅
🤖 android 🤖 success ✅
🍎 iOS 🍎 cancelled 🔪

Bundle Size Analysis (Sentry):

@MelvinBot

Copy link
Copy Markdown
Contributor

🤖 Help site review: No documentation changes required.

This PR is a straight revert of Expensify/App#92131 (which caused deploy blocker Expensify/App#93088). The changes are purely internal implementation details:

These only affect which policyID is passed to the backend export call when exporting with custom templates — there is no change to any user-facing feature, flow, UI label, button, or instruction. The existing export help articles (e.g. How to Export Expenses, How to Export Reports, Search and Download Expenses) describe the user-facing export experience, which is unaffected by this revert.

No draft help site PR was created because no App/docs/articles content needs updating.

@madmax330, please confirm you agree no help site changes are needed. If you believe a doc update is warranted, let me know what behavior changed for users and I'll create the draft PR.

@OSBotify

Copy link
Copy Markdown
Contributor

🚀 Deployed to production by https://github.com/Julesssss in version: 9.4.4-3 🚀

platform result
🕸 web 🕸 success ✅
🤖 android 🤖 success ✅
🍎 iOS 🍎 success ✅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CP Staging marks PRs that have been CP'd to staging

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants